BaseStatelessReplayLastSubjectAsync(Optional) constructor¶
Defined in
Type: BaseStatelessReplayLastSubjectAsyncReactiveUI.Extensions.Async.Subjects
Assembly: ReactiveUI.Extensions.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
protected BaseStatelessReplayLastSubjectAsync(Optional<T> startValue)
Summary: Provides a base class for stateless, asynchronous subjects that replay the last value to new subscribers and support resuming after errors or completion. Designed for scenarios where observers may join at any time and should receive the most recent value, if available.
Parameters
| Name | Type | Description |
|---|---|---|
startValue | [Optional | The optional initial value to be used as the starting point for the subject. If provided, this value is immediately available to new subscribers until a new value is published. |
Remarks
This abstract class implements asynchronous observer and observable patterns, allowing derived classes to define custom notification, error handling, and completion behaviors. It manages observer subscriptions and ensures that the most recent value (if any) is replayed to new subscribers. Thread safety is provided for concurrent access and notification. Typical use cases include event streaming, stateful data flows, or scenarios where late subscribers should receive the latest state.